package com.tuanchau.android.englishtooltip.database;

import android.graphics.Bitmap;

public class WordStruct {
	public int id;
	public String word, type, pron, mean;
	public byte[] image;
	public Bitmap bitmap;
	
	public WordStruct(){
		init(-1, "", "", "", "", null, null);
	}
	
	public WordStruct(int id, String word, String type, String pron, String mean, byte[] image){
		init(id, word, type, pron, mean, image, null);
	}

	public WordStruct(int id, String word, String type, String pron, String mean, byte [] image, Bitmap bitmap){
		init(id, word, type, pron, mean, image, bitmap);
	}
	
	private void init(int id, String word, String type, String pron,
			String mean, byte[] image, Bitmap bitmap) {
		this.id = id;
		this.word = word;
		this.type = type;
		this.pron = pron;
		this.mean = mean;
		this.image = image;
		this.bitmap = bitmap;
	}
	
	public String getWordWithType() {
		String t = "";
		if(type.equalsIgnoreCase("noun")) {
			t = "(n)";
		}
		else if(type.equalsIgnoreCase("verb")) {
			t = "(v)";
		}
		else if(type.equalsIgnoreCase("adjective")) {
			t = "(a)";
		}
		else if(type.equalsIgnoreCase("adverb")) {
			t = "(adv)";
		}
		
		
		return word + " " + t;
	}
	
	
}
